package cn.dansj.common.utils.exception;

public class SerializationException extends RuntimeException {
    private final Class<?> serializedClass;
    private static final String MSG_FOR_SPECIFIED_CLASS = "serialize for class [%s] failed. ";

    public SerializationException(Class<?> serializedClass, Throwable throwable) {
        super(String.format(MSG_FOR_SPECIFIED_CLASS, serializedClass.getName()), throwable);
        this.serializedClass = serializedClass;
    }

    public Class<?> getSerializedClass() {
        return serializedClass;
    }
}
